package com.bnz.pojo;

import io.mybatis.provider.Entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Entity.Table("student")
public class Student implements Serializable {

    //id:是否设置为主键 value = "sid":指定属性名对应的字段名 updatable:是否允许更新 insertable：是否允许插入
    @Entity.Column(id = true,value = "sid",remark = "主键", updatable = false, insertable = false)
    private Integer id;

    @Entity.Column
    private String sname;

    @Entity.Column
    private String sex;

    @Entity.Column
    private Integer age;

    @Entity.Column
    private String addr;

    @Entity.Column
    private Integer cid;


    private String cname;

}